package boot.controller;


import boot.entity.Emp;
import boot.service.IEmpService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author HLF
 * @since 2022-04-05
 * /emp/getAll
 */
@RestController
@RequestMapping("/emp")
public class EmpController {
    @Resource
    private IEmpService empService;

    @GetMapping("/getAll")
    public List<Emp> getAll() {
        return empService.getAllEmp();
    }

    @GetMapping("/getAll2")
    public List<Emp> getAll2() {
        return empService.getAllEmp2();
    }
}
